<%
/**
 * remove 从角色中批量移除系统用户
 * 
 * @author   张彬
 * @version v1.0
 * @date     2011-10-17
 * @since   JDK1.6
 */
%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="at" uri="/WEB-INF/util_tag.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title><s:text name="sysRole.remove.title"></s:text></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta content="no-cache" http-equiv="Pragma" />
		<meta content="no-cache" http-equiv="Cache-Control" />
		<meta content="0" http-equiv="Expires" />
		<meta name="GENERATOR" content="MSHTML 8.00.6001.18854" />
		<link rel="stylesheet" type="text/css" href="<at:url css="dialog.css"/>" />
		<script type="text/javascript" src="${rootPath}/Common/Js/jquery.js"></script>
		<script type="text/javascript" src="${rootPath}/Common/Js/common.js"></script>
		<script type="text/javascript" src="<at:url js="dialog.js"/>"></script>
   		<script type="text/JavaScript">   
   			var MyObject = window.dialogArguments;
   			
		    function okClick()  
		    {	
		        var resultList = "";
		        var SelectedPeopleList=document.getElementById("SelectedList");
			    if ( SelectedPeopleList.options.length > 0 ){
				    for ( i = 0; i < SelectedPeopleList.options.length; i++ ){
		                if(SelectedPeopleList.options[i].text!="" && SelectedPeopleList.options[i].text!=null){
		                    resultList=resultList + SelectedPeopleList.options[i].value;
		                    if(i < SelectedPeopleList.options.length - 1){
		                        resultList += ",";
		                    }
				        }
				    }
					startRequest("SysRole!removeUser.action?page=${page}&funId=${funId}&object.id=${object.id}", function(text){window.close();},{ids:resultList});       
			    }
		        else{  
		            alert('<s:text name="js.common.noChoise"></s:text>');
		        }
		    }    
		    
		    function doCancel()
		    {      
		        window.close();
		    }    
    	</script>
	</head>
	<body>
		<form action="SysRole!remove.action">
		    <div class="dialog_mutil3">
		        <table width="100%" border="0" cellpadding="0" cellspacing="0" style="height: 310px;">
		            <tr>
		                <td valign="top">
		                	<div class="ele_checkbox ele_checkbox2">
		                    <div class="checkbox_title"><span onclick="selectReverse('checkone');"><s:text name="sysRole.remove.select"></s:text></span></div>
		                    <div id="peopleList" style="OVERFLOW-Y:auto;OVERFLOW-X:auto;width: 90;height:286px;border: 0px">
		                    	<s:iterator value="#request['userList']" status="status">         
									<input type="checkbox" name='checkone' value="${id}" thetext="${name}" onclick="selected(this)" />${name}<br/>
							  	</s:iterator>
		                     </div>
		                     </div>                    
		                </td>
		                <td width="20px" valign="top">
		                	<div class="arrow3">
								<div class="arrow_top" onclick="moveUp(document.all.SelectedList);"></div>
								<div class="arrow_middle" onclick="removeAll(document.all.SelectedList);"></div>
								<div class="arrow_bottom" onclick="moveDown(document.all.SelectedList);"></div>
							</div>
		                </td>
		                <td width="130px" valign="top">
							<div class="select_title">
								<s:text name="sysRole.remove.selectedList"></s:text>
							</div>
		                    <div class="select_lump3" style="height: 286px;">
								<div>
									<select multiple="multiple" id="SelectedList" ondblclick="removeSelect(this);" size="5"
										style="width: 130px; height: 286px; margin: 0px; padding: 0px;">
									</select>
								</div>
							</div>
		                </td>
		            </tr>
		        </table> 
		        <div class="dialog_button dialog_button6">
					<div class="button_left button_left6" onclick="okClick();">
						<nobr><s:text name="sysRole.remove.confirm"></s:text></nobr>
					</div>
					<div class="button_right button_right6" onclick="doCancel();">
						<nobr><s:text name="sysRole.remove.cancel"></s:text></nobr>
					</div>
				</div>
		    </div>
		</form>
	</body>
</html>
